body {
  background-color: var(--background-color);
}

.rec-element {
  text-transform: uppercase;
  position: absolute;
  top: 14px;
  right: 19px;
  color: var(--rec-element-color);
  text-align: center;
  font-family: var(--font-family);
  font-size: var(--text-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--text-font-size);
}

button {
  cursor: pointer;
}

.rec-element::after {
  fill: var(--rec-element-color);
  box-shadow: 0 0 4px 2px var(--rec-element-color);
  margin-left: 10px;
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 50%;
  background-color: var(--rec-element-color);
  margin-bottom: 1px;
}

.header {
  padding: 10px;
  height: 100vh;
  min-height: 668px;
  display: grid;
  grid-template-rows: 1fr min-content 1fr;
  align-items: center;
  justify-items: end;
}

.decorated-element::before,
.decorated-element::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
}

.decorated-element::before {
  top: 10px;
  right: 10px;
  border-top: 1px solid var(--corner-color);
  border-right: 1px solid var(--corner-color);
}

.decorated-element::after {
  left: 10px;
  bottom: 10px;
  border-left: 1px solid var(--corner-color);
  border-bottom: 1px solid var(--corner-color);
}

.header__theme-menu-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  list-style-type: none;
  gap: 12px;
}

.header__theme-menu-item:hover {
  outline: 1px solid var(--button-list-hover-color);
}

.header__theme-menu-button {
  background: none;
  border: none;
  color: var(--button-list-color);
  font-family: var(--font-family);
  font-size: var(--text-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--text-font-size);
  text-transform: lowercase;
  padding: 2px 13px 4px 13px;
}

.header__theme-menu-button_active {
  outline: 1px solid var(--button-list-color);
  pointer-events: none; 
}

.header__theme-menu-button:focus {
  outline: none;
}

.header__theme-menu-button:focus-visible {
  box-shadow: 0 1px 0 var(--button-list-color);
}

.header__topic-name {
  color: var(--header-color);
  text-shadow: 4px 4px 0px var(--shadow-color);
  font-family: var(--font-family);
  font-size: clamp(7.25rem, 7.0115rem + 1.0178vw, 7.5rem);
  font-style: normal;
  font-weight: 700;
  line-height: 82.5%; /* 95.7px */
}

.header__topic-description {
  color: var(--heading-text-color);
  font-family: var(--font-family);
  font-size: var(--text-font-size);
  font-style: normal;
  font-weight: 700;
  line-height: var(--text-line-height);
  background-color: var(--title-decor);
}

main {
  padding: 0px 10px 0px 10px;
}

.why {
  display: grid;
}

.section__header {
  color: var(--subtitle-color);
  font-family: var(--font-family);
  font-size: var(--text-font-size);
  font-style: normal;
  font-weight: 700;
  line-height: var(--text-line-height);
  margin-top: 41px;
  margin-bottom: 20px;
}

article {
  margin-bottom: 21px;
}

article:last-of-type {
  margin-bottom: 0px;
}

.what__template {
  padding-top: var(--small-gap);
}

.section__sub-header {
  color: var(--heading-text-color);
  font-family: var(--font-family);
  font-size: var(--text-font-size);
  font-style: normal;
  font-weight: 700;
  line-height: var(--text-line-height);
  background-color: var(--title-decor);
  margin: 0px 0px 10px 0px;
}

.section__text {
  color: var(--text-main-color);
  font-family: var(--font-family);
  font-size: var(--text-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--text-line-height);
  padding-bottom: 20px;
}

.section__text:last-of-type {
  padding-bottom: 0px;
}

.link-unique {
  text-decoration: none;
  text-shadow: 2px 2px 0px var(--accent-color);
  cursor: pointer;
}

.link-unique:hover {
  border-bottom: 1px solid var(--unique-decoration-color);
}

.link-unique:focus {
  outline: none;
}

.link-unique:focus-visible {
  outline: 1px solid var(--unique-decoration-color);
}

.what {
  display: grid;
}

.how {
  display: grid;
}

.how-template {
  padding-top: var(--small-gap);
}

.section__how-advice {
  color: var(--heading-text-color);
  background-color: var(--title-decor);
  font-family: var(--font-family);
  font-size: var(--text-font-size);
  font-style: normal;
  font-weight: 700;
  line-height: var(--text-line-height);
  margin-bottom: 20px;
}

.how-differences {
  font-weight: 400;
  margin-bottom: 12px;
}

.image-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.image-section__header {
  color: var(--heading-text-color);
  background-color: var(--title-decor);
  font-family: var(--font-family);
  font-size: var(--text-font-size);
  font-style: normal;
  font-weight: 700;
  line-height: var(--text-line-height);
  margin-top: 50px;
}

.image-section__body {
  display: grid;
}

.image-section__element {
  inline-size: 100%;
  gap: 10px;
}

.footer {
  margin-top: 40px;
  position: relative;
  display: grid;
  place-items: center;
  height: 100vh;
  min-height: 668px;
}

.footer__title {
  justify-self: center;
  align-self: center;
  position: relative;
  display: flex;
  justify-content: center;
  color: var(--footer-color);
  text-shadow: 4px 4px 0px var(--shadow-color);
  font-family: var(--font-family);
  font-size: clamp(7.25rem, 7.0115rem + 1.0178vw, 7.5rem);
  font-style: normal;
  font-weight: 700;
  line-height: 82.5%;
}

@media ( width >= 768px ) {

  .rec-element {
    top: 24px;
    right: 29px;
  }

  .header {
    padding: 20px 20px 20px 0;
  }

  .decorated-element::before {
    top: 20px;
    right: 20px;
  }
  
  .decorated-element::after {
    left: 20px;
    bottom: 20px;
  }

  .header__topic-name {
    justify-self: start;
  }

  .header__grid-template {
    display: grid;
    grid-template-columns: 49%;
    justify-content: end;
  }

  main {
    padding: 0px 20px 0px 20px;
  }

  .why {
    grid-template-columns: 1fr 2fr;
    column-gap: 20px;
    margin: 60px 0px 20px 0px;
  }

  .section__header {
    margin-top: 0;
  }

  .what__template {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 20px;
    margin-top: 63px;
    padding-top: 0;
  }

  .how {
    margin-top: 84px;
    grid-template-columns: 1fr 2fr;
    column-gap: 20px;
  }

  .how-template {
    padding: 0;
  }
  
  .image-section {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 100%;
    display: grid;
    margin-top: 77px;
  }

  .image-section__header {
    margin-bottom: 0;
    margin-top: 0;
    grid-column: span 3;
  }

  .image-section__element {
    block-size: 100%;
    object-fit: cover;
  }

  .image-section__element-sunset {
    grid-column: span 2;
  }

  .image-section__element-ice-cream {
    grid-row: span 2;
  }
  .image-section__element-tape {
    grid-row: span 2;
  }

  .image-section__element-street {
    grid-column: span 2;
  }
  .image-section__element-books {
    grid-column: 2;
    grid-row: 3;
  }

  .footer {
    margin-top: 60px;
  }
}

@media (width >= 1024px) {

  .header__theme-menu {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
  }

  .header__theme-menu-list {
    padding: 0;
    flex-direction: row;
    justify-content: center;
    padding-left: 20px;
    gap: 10px;
  }

  .header__topic-name {
    font-size: clamp(7.5rem, 0.5625rem + 14.4531vw, 9.8125rem);
  }

  .header__grid-template {
    grid-template-columns: 64%;
  }

  .why {
    column-gap: 10px;
    margin: 60px 0px 18px 0px;
  }

  .section__topic {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 20px;
  }

  .how {
    margin-top: 83px;
    column-gap: 10px;
  }

  .image-section {
    margin-top: 76px;
  }

  .footer__title {
    font-size: clamp(7.5rem, 0.5625rem + 14.4531vw, 9.8125rem);
  }
}

.page {
  background-attachment: fixed;
  background-image: url(../images/cover-image-dark.png);
  background-color: var(--background-color);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}
